import { FC, ReactText } from 'react';

interface DisplayDetailValueProps {
  _value: ReactText;
  value: string;
  displayValue: boolean;
}

const DisplayDetailValue: FC<DisplayDetailValueProps> = ({ _value, value, displayValue, ...a }) => {
  if (displayValue) {
    return <span>{value ?? _value}</span>;
  }

  return <span>{_value ?? value}</span>;
};

export default DisplayDetailValue;
